home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / GTGRPHMD.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-05  |  538 b   |  22 lines

  1. #include <graphics.h>
  2.  
  3. main()
  4. {
  5.     int errorcode;
  6.     int graphdriver = DETECT;
  7.     int graphmode,gmode;
  8.     char buffer[80];
  9.  
  10. /*  Detect and initialize graphics system */
  11.  
  12.     initgraph(&graphdriver,&graphmode, "c:\\turboc");
  13.     gmode=getgraphmode();
  14.     sprintf(buffer,"Currently in graphics mode %d "
  15.             "on driver %d",gmode,graphdriver);
  16.     outtextxy(10,getmaxy()/2,buffer);
  17.     outtextxy(getmaxx()/2,getmaxy() - 50,
  18. "Press any key to exit:");   /* Wait until a key is pressed */
  19.     getch();
  20.  
  21.     closegraph();  /* exit graphics library */
  22. }